{* printable invoice *}
<html>

<head>
<link rel=STYLESHEET href="style1.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset={$smarty.const.DEFAULT_CHARSET}">
<title>{$smarty.const.STRING_INVOICE}{if $error eq ""} :: {$smarty.const.STRING_ORDER} #{$order.orderID}{/if}</title>
</head>

<body onLoad="window.print();">

{if $error ne ""}

	<p>{$error}

{else}

<center>
			<p><font class=big><b>{$smarty.const.CONF_SHOP_NAME}</b></font>
			<br>{$smarty.const.CONF_SHOP_URL}

			<h1>{$smarty.const.STRING_INVOICE}</h1>

			<table border="0" cellspacing="1" cellpadding="7">

				<tr>
					<td>
						<strong>
							<font class=faq>
								<u>{$smarty.const.STRING_ORDER}</u>
							</font>
						</strong>
					</td>
					<td>
						<strong>
							<font class=faq>
								<u>{$smarty.const.STRING_PAYMENT_TYPE}</u>
							</font>
						</strong>
					</td>
					<td>
						<strong>
							<font class=faq>
								<u>{$smarty.const.STRING_SHIPPING_TYPE}</u>
							</font>
						</strong>
					</td>
				</tr>

				<tr valign="top">
					<td>
						<table border=0>
							<tr>
								<td>{$smarty.const.TABLE_ORDER_TIME}: <b>{$order.order_time}</b></td>
							</tr>
							<tr>
								<td>{$smarty.const.ADMIN_ORDER_NUMBER}: <b>{$order.orderID}</b></td>
							</tr>
							<tr>
								<td>{$smarty.const.TABLE_CUSTOMER}: <b>{$order.customer_firstname} {$order.customer_lastname}</b></td>
							</tr>
							<tr>
								<td>{$smarty.const.CUSTOMER_EMAIL} <b>{$order.customer_email}</b></td>
							</tr>


						</table>
					</td>
					<td>
						<table>
							<tr>
								<td>{$smarty.const.STRING_PAYMENT_TYPE}: <b>{$order.payment_type}</b></td>
							</tr>
							<tr>
								<td>{$smarty.const.ADMIN_PAYER}: <b>{$order.billing_firstname} {$order.billing_lastname}</b></td>
							</tr>
							<tr>
								<td>{$smarty.const.STRING_BILLING_ADDRESS}:<br>
									<b>{if $order.billing_address ne ""}{$order.billing_address|replace:"<":"&lt;"}<br>{/if}
							{if $order.billing_city ne ""}{$order.billing_city|replace:"<":"&lt;"}{/if}
							{if $order.billing_state ne ""}{$order.billing_state|replace:"<":"&lt;"}{/if}
							{if $order.billing_zip ne ""}{$order.billing_zip|replace:"<":"&lt;"}<br>{/if}{if $order.billing_country ne ""}{$order.billing_country|replace:"<":"&lt;"}{/if}</b>
								</td>
							</tr>

				</table>
			</td>
			<td>
				<table>
					<tr>
						<td>{$smarty.const.STRING_SHIPPING_TYPE}: <b>{$order.shipping_type}</b> {if $order.shippingServiceInfo}({$order.shippingServiceInfo}){/if}</td>
					</tr>
					<tr>
						<td>{$smarty.const.STRING_RECEIVER}: <b>{$order.shipping_firstname} {$order.shipping_lastname}</b></td>
					</tr>
					<tr>
						<td>{$smarty.const.STRING_SHIPPING_ADDRESS}:<br>
							<b>{if $order.shipping_address ne ""}{$order.shipping_address|replace:"<":"&lt;"}<br>{/if}
							{if $order.shipping_city ne ""}{$order.shipping_city|replace:"<":"&lt;"}{/if}
							{if $order.shipping_state ne ""}{$order.shipping_state|replace:"<":"&lt;"}{/if}
							{if $order.shipping_zip ne ""}{$order.shipping_zip|replace:"<":"&lt;"}<br>{/if}{if $order.shipping_country ne ""}{$order.shipping_country|replace:"<":"&lt;"}{/if}</b>
						</td>
					</tr>
				</table>
			</td>
		</tr>

		<tr valign="top"> 
          	<td colspan="3">
				<strong>
					<font class=faq><u>{$smarty.const.ADMIN_ORDERED_PRODUCTS}</u></font>
				</strong>
			</td>
       </tr>

		<tr>
			<td colspan="3">

				<table width="100%" border="0" cellpadding="5" cellspacing="1" 
					bgcolor=#{$smarty.const.CONF_DARK_COLOR}>

					<tr bgcolor=#{$smarty.const.CONF_MIDDLE_COLOR}> 
                		<td><strong>{$smarty.const.ADMIN_PRODUCT_NAME}</strong></td>
                		<td align="center"><strong>{$smarty.const.TABLE_PRODUCT_QUANTITY}</strong></td>
                		<td align="center"><strong>{$smarty.const.STRING_TAX}</strong></td>
                		<td align="right"><strong>{$smarty.const.TABLE_PRODUCT_COST_WITHOUT_TAX}</strong></td>
              		</tr>

					{section name=i loop=$orderContent}
					<tr bgcolor=#{$smarty.const.CONF_LIGHT_COLOR}> 
                		<td>
							{$orderContent[i].name}

							{if $orderContent[i].eproduct_filename}
								{if $completed_order_status}
									{if $completed_order_status == $order.statusID}

										<a href='get_file.php?getFileParam={$orderContent[i].getFileParam}'>
											{$smarty.const.ADMIN_DOWN_LOAD} {$orderContent[i].file_size} b
										</a>
	
										{if $orderContent[i].day_count_remainder > 0}
											- {$smarty.const.ADMIN_EPRODUCT_AVAILABLE_DAYS} 
												{$orderContent[i].day_count_remainder}
											{$smarty.const.ADMIN_DAYS}
											{if $orderContent[i].load_counter_remainder != 0}
												,
												{$smarty.const.ADMIN_REMANDER_EPRODUCT_DOWNLOAD_TIMES} 
													{$orderContent[i].load_counter_remainder}
												{$smarty.const.ADMIN_DOWNLOAD_TIMES}
											{/if}
										{/if}
									{/if}
								{/if}
							{/if}

						</td>
                		<td align="center">{$orderContent[i].Quantity}</td>
                		<td align="center">{$orderContent[i].tax} %</td>
                		<td align="right">{$orderContent[i].PriceToShow}</td>
              		</tr>
					{/section}
				</table>

			</td>
		</tr>

		<tr>

			<td colspan="3">

			<table width="100%" border="0">

				<tr>
					<td width="80%" align="right">{$smarty.const.STRING_PRED_TOTAL}:</td>
					<td width="20%" align="right">{$order.clear_total_priceToShow}</td>
				</tr>
				<tr>
					<td width="80%" align="right">{$smarty.const.ADMIN_DISCOUNT}:</td>
					<td width="20%" align="right">{$order.order_discount}</td>
				</tr>
				<tr>
					<td width="80%" align="right">{$smarty.const.ADMIN_SHIPPING_COST}:</td>
					<td width="20%" align="right">{$order.shipping_costToShow}</td>
				</tr>
				<tr>
					<td width="80%" align="right"><b>{$smarty.const.TABLE_TOTAL}</b></td>
					<td width="20%" align="right"><b>{$order.order_amountToShow}</b></td>
				</tr>
			</table>

			</td>
			
		</tr>

	</table>

</center>

{/if}

</body>

</html>